import math
import foo as pkg_foo
import sys
import time

pkg_path = '/home/tk/.pyenv/versions/t6/lib/python3.6/site-packages/'
sys.path.insert(0, pkg_path)


print('pkg_foo path:', pkg_foo.__file__)


class A:
    def do_someting(self):
        print('do_someting.....')

    def clac_test(self, ed):
        for i in range(1, ed):
            math.sqrt(i)


times = 10000000

st1 = time.clock()
pkg_foo.A().clac_test(times)
ed1 = time.clock()
print('running pkg_foo time:', ed1-st1)

st2 = time.clock()
A().clac_test(times)
ed2 = time.clock()
print('running raw_foo time:', ed2-st2)
